"""
 encoding    : utf-8
 @File       : get_data.py
 @Author     : sugar 
 @Version    :
 @Description:
 @Date       : 2024/07/10
"""
import xlrd


class Get_data:
    def get_data_login_fail(self):
        '''获取登录反向测试数据'''
        login_data = []
        ow = xlrd.open_workbook(r"E:\cloud_test(3)\auto_code\data\login_data_fail.xls")
        table = ow.sheet_by_index(0)
        for i in range(1,table.nrows):
            login_data.append(table.row_values(i))
        print(login_data)
        return login_data

    def change_passwd_fail(self):
        '''获取修改密码反向测试数据'''
        login_data = []
        ow = xlrd.open_workbook(r"E:\cloud_test(3)\auto_code\data\change_fail_data.xls")
        table = ow.sheet_by_index(1)
        for i in range(1,table.nrows):
            login_data.append(table.row_values(i))
        print(login_data)
        return login_data

    def change_passwd_right(self):
        '''获取修改密码正向测试数据'''
        login_data = []
        ow = xlrd.open_workbook(r"E:\cloud_test(3)\auto_code\data\change_fail_data.xls")
        table = ow.sheet_by_index(0)
        for i in range(1,table.nrows):
            login_data.append(table.row_values(i))
        print(login_data)
        return login_data


a =Get_data()
a.get_data_login_fail()
a.change_passwd_fail()
a.change_passwd_right()

